<template>
	<view>
		<button @click="greet">Greet</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: 'Vue.js'
			}
		},
		//
		methods: {
			greet(event) {
				//'event'是原生DOM事件
				console.log(event);
				uni.showToast({
					title: 'hello' + this.name + '!'
				});
			}
		}
	}
</script>

<style>

</style>